<?php

namespace AppBundle\Util;

class HttpJointUtil
{

    /**
     * @param type $host string
     * @param type $path string
     * @param type $queryString string
     * @param type $schemal string
     * @param type $port string
     * @return string
     */
    public static function generateUrl($host, $path, $schemal = 'http', $port = '80')
    {
        if (substr($path, 0, 1) !== '/') {
            $path = '/' . $path;
        }
        $url = $schemal . '://' . $host . ':' . $port. $path;
        return $url;
    }

}
